import RouterObj from '@/permission/RouterObj'
export const systemRouterList: RouterObj = {
  path: '/system',
  name: 'System',
  redirect:'/userManage',
  component: () => import('@/views/System/index.vue'),
  meta: {
    role: [['admin']],
    title: '系统管理',
    icon: 'fa-motorcycle',
    isShow: true,
    isOnRouter: false,
  },
  children: [
    {
      path: '/userManage',
      name: 'UserManage',
      component: () => import('@/views/System/UserManage.vue'),
      meta: {
        role: [['admin']],
        title: '用户管理',
        icon: 'fa-table',
        isShow: true,
        isOnRouter: false,
        roles: [
          {
            authorityCode: 'POST:/v1/users',
            pauthorityCode: '/userManage',
            label: '查询用户'
          },
          {
            authorityCode: 'POST:/v1/users/create',
            pauthorityCode: '/userManage',
            label: '新增用户'
          },
          {
            authorityCode: 'POST:/v1/users/modify',
            pauthorityCode: '/userManage',
            label: '修改用户'
          },
          {
            authorityCode: 'POST:/v1/users/batchDelete',
            pauthorityCode: '/userManage',
            label: '删除用户'
          }
        ]
      }
    },
    {
      path: '/roleManage',
      name: 'RoleManage',
      component: () => import('@/views/System/RoleManage.vue'),
      meta: {
        role: [['admin']],
        title: '角色管理',
        icon: 'fa-table',
        isShow: true,
        isOnRouter: false,
        roles: [
          {
            authorityCode: 'POST:/v1/role',
            pauthorityCode: '/roleManage',
            label: '查询角色'
          },
          {
            authorityCode: 'POST:/v1/role/create',
            pauthorityCode: '/roleManage',
            label: '新增角色'
          },
          {
            authorityCode: 'POST:/v1/role/batchDelete',
            pauthorityCode: '/roleManage',
            label: '删除角色'
          },
          {
            authorityCode: 'POST:/v1/role/modify',
            pauthorityCode: '/roleManage',
            label: '修改角色'
          },
          {
            authorityCode: 'POST:/v1/role/authorities',
            pauthorityCode: '/roleManage',
            label: ' 查询角色权限'
          },
          {
            authorityCode: 'POST:/v1/role/authorities/create',
            pauthorityCode: '/roleManage',
            label: ' 修改权限'
          },
        ]
      },
    },
    {
      path: '/departmentManage',
      name: 'DepartmentManage',
      component: () => import('@/views/System/DepartmentManage.vue'),
      meta: {
        role: [['admin']],
        title: '部门管理',
        icon: 'fa-table',
        isShow: true,
        isOnRouter: false,
        roles: [
          {
            authorityCode: 'POST:/v1/org',
            pauthorityCode: '/departmentManage',
            label: '查询部门'
          },
          {
            authorityCode: 'POST:/v1/org/create',
            pauthorityCode: '/departmentManage',
            label: '新增部门'
          },
          {
            authorityCode: 'POST:/v1/org/modify',
            pauthorityCode: '/departmentManage',
            label: '修改部门'
          },
          {
            authorityCode: 'POST:/v1/org/batchDelete',
            pauthorityCode: '/departmentManage',
            label: '删除部门',
            relationShip: [
              'POST:/v1/org'
            ]
          },
        ]
      },
    }
  ]
}